package com.cruise.game.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 订单评价实体类
 * 
 * @author cruise
 * @date 2025-02-28
 */
@Data
@TableName("order_ratings")
public class OrderRating implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键，评价ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 关联订单ID
     */
    private Long orderId;

    /**
     * 关联用户ID
     */
    private Long userId;

    /**
     * 关联代理ID
     */
    private Long agentId;

    /**
     * 评分(1-5)
     */
    private Integer rating;

    /**
     * 评价内容
     */
    private String comment;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    /**
     * 逻辑删除标记
     * 注意：数据库表中暂不存在此字段
     */
    @TableLogic
    @TableField(exist = false)
    private Integer deleted;
}
